# Contributor: Steven Guikal <void@fluix.one>
# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-flask
_pkgname=flask
pkgver=2.3.3
pkgrel=0
pkgdesc="web development microframework"
url="https://flask.palletsprojects.com/"
arch="noarch"
license="MIT"
depends="
	py3-blinker
	py3-click
	py3-itsdangerous
	py3-jinja2
	py3-werkzeug
	python3
	"
makedepends="
	py3-gpep517
	py3-flit-core
	"
checkdepends="
	py3-pytest-xdist
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-flask" # Backwards compatibility
provides="py-flask=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
801b2521c42de7a4cd16005ea6ea7737aaef6c88edacb38ab03e2d78bb4e080e35e540c23e157e2bcdb43e4818b4b7a856c50c6cf41bb17f0b7b2590c0c6aff2  flask-2.3.3.tar.gz
"
